<template>
	<view class="contentar">
		<Search :goodsCount="goodsCount"></Search>
		<Swiper></Swiper>
		<HomeLayout :channel="channel"></HomeLayout>
		<Coupon :coupon="couponList" :grouponList="grouponList"></Coupon>
		<Brand :brandList="brandList" :newGoodsList="newGoodsList" ></Brand>
		<Product :newGoodsList="newGoodsList"></Product>
		<Selection :hotGoodsList="hotGoodsList" :topicList="topicList" :floorGoodsList="floorGoodsList"></Selection>
	</view>
</template>

<script>
import Search from '../../components/index/Search/Search.vue';
import Swiper from '../../components/index/Swiper/Swiper.vue';
import HomeLayout from '../../components/index/HomeLayout/HomeLayout.vue';
import Coupon from '../../components/index/Coupon/Coupon.vue';
import Brand from '../../components/index/Brand/Brand.vue';
import Selection from '../../components/index/Selection/Selection.vue';
import Product from '../../components/Product/Product.vue';
	export default {
		components:{Search,Swiper,HomeLayout,Coupon,Brand,Selection,Product},
		data() {
			return {
				newGoodsList:[],//新品列表
				hotGoodsList:[],//人气推荐商品列表
				topicList:[],//专题精选列表
				brandList:[],//品牌商列表
				floorGoodsList:[],//：分类商品列表
				banner:[],//：banner列表
				grouponList:[],//：团购专区列表
				channel:[],//：一级分类列表
				couponList:[],//：优惠券列表
				goodsCount:[],
			}
		},
	
 onShow(){
	  //  console.log(this.vuex_version)
	  // this.$u.vuex('vuex_name','lianghaufeng')
	  // console.log(this.vuex_name)
	 this.$get(this.API.home).then((res)=>{
		        this.newGoodsList=res.data.data.newGoodsList
		  	    this.brandList=res.data.data.brandList
		  		this.hotGoodsList=res.data.data.hotGoodsList
		  	    this.topicList=res.data.data.topicList
		  	    this.grouponList=res.data.data.grouponList
		  	    this.floorGoodsList=res.data.data.floorGoodsList
		  	    this.banner=res.data.data.banner
		  	    this.channel=res.data.data.channel
		  	    this.couponList=res.data.data.couponList
		  	
		  
	  }).catch((res)=>{
		  
		  
	  })
	

	
	}
	
	}
</script>

<style lang="scss" scoped>
.contentar{

	
}
</style>
